From: Raimond Spekking Date: Tue, 15 Jun 2010 18:16:36 +0000 (+0000) Subject: Follow-up r65013: Add an input field for the username. Use the nice Xml::buildForm... X-Git-Tag: 1.31.0-rc.0~36500 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=080a8d4b2c44425b354f4777bc06503596a13497;p=lhc%2Fweb%2Fwiklou.git Follow-up r65013: Add an input field for the username. Use the nice Xml::buildForm() function --- diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index bd1d0ae8ce..ed61f721ea 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -173,21 +173,28 @@ class ImageListPager extends TablePager { function getForm() { global $wgRequest, $wgScript, $wgMiserMode; $search = $wgRequest->getText( 'ilsearch' ); - - $s = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', null, wfMsg( 'listfiles' ) ) . - Xml::tags( 'label', null, wfMsgHtml( 'table_pager_limit', $this->getLimitSelect() ) ); - + $inputForm = array(); + $inputForm['table_pager_limit_label'] = $this->getLimitSelect(); if ( !$wgMiserMode ) { - $s .= "
\n" . - Xml::inputLabel( wfMsg( 'listfiles_search_for' ), 'ilsearch', 'mw-ilsearch', 20, $search ); + $inputForm['listfiles_search_for'] = Html::input( 'ilsearch', $search, 'text', array( + 'size' => '40', + 'maxlength' => '255', + 'id' => 'mw-ilsearch', + ) ); } - $s .= ' ' . - Xml::submitButton( wfMsg( 'table_pager_limit_submit' ) ) ."\n" . - $this->getHiddenFields( array( 'limit', 'ilsearch' ) ) . - Xml::closeElement( 'fieldset' ) . - Xml::closeElement( 'form' ) . "\n"; + $inputForm['username'] = Html::input( 'username', $this->mUserName, 'text', array( + 'size' => '40', + 'maxlength' => '255', + 'id' => 'mw-listfiles-username', + ) ); + $s = Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) . + Xml::fieldset( wfMsg( 'listfiles' ) ) . + Html::openElement( 'table', array( 'mw-listfiles-table' ) ) . + Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) . + $this->getHiddenFields( array( 'limit', 'ilsearch', 'username' ) ) . + Html::closeElement( 'table' ) . + Html::closeElement( 'fieldset' ) . + Html::closeElement( 'form' ) . "\n"; return $s; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 53bdef53c6..7ad37af610 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4050,6 +4050,7 @@ Please confirm that you really want to recreate this page.", 'table_pager_first' => 'First page', 'table_pager_last' => 'Last page', 'table_pager_limit' => 'Show $1 items per page', +'table_pager_limit_label' => 'Items per page:', 'table_pager_limit_submit' => 'Go', 'table_pager_empty' => 'No results', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index ff7d75decb..617bf9fb5a 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2979,6 +2979,7 @@ $wgMessageStructure = array( 'table_pager_first', 'table_pager_last', 'table_pager_limit', + 'table_pager_limit_label', 'table_pager_limit_submit', 'table_pager_empty', ),